//
//  JackViewExtension..swift
//  SparklingPets
//
//  Created by iOS-Czz on 2023/10/26.
//

import Foundation
import UIKit
import WMZDialog
extension UIView {
    static func showTipsView(_ message:String){
        let dialog = Dialog()
        dialog
            .wMessageSet()(message)
            .wTypeSet()(DialogTypeToast)
            .wToastPositionSet()(DialogToastBottom)
//            .wMainOffsetYSet()(200)
            .wHeightSet()(60)
            .wMainBackColorSet()(UIColor(red: 0, green: 0, blue: 0, alpha: 0.7))
            .wMessageColorSet()(.white)
        _ = dialog.wStart();
    }
    
    static func showResultView(_ message:String, _ succeed:Bool){
        let dialog = Dialog()
        dialog
      .wTypeSet()(DialogTypeAuto)
        //设置宽度
        .wWidthSet()(100)
        .wMessageSet()(message)
        .wImageNameSet()(succeed ? "icon_succeed" : "icon_failed")
        _ = dialog.wStart();
    }
}
